package com.leave.mos.controller.find;

import com.leave.mos.entity.QueryParam;
import com.leave.mos.service.find.QueryAggregateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName MongodbSaveController
 * @Description TODO
 * @Author lh
 * @Date 2021/7/7 17:42
 * @Version 1.0
 **/

@RestController
@RequestMapping("aggregate")
public class QueryAggregateController {

    @Autowired
    private QueryAggregateService queryAggregateService;

    @RequestMapping("/aggregate1")
    List<Map> findQuery1(QueryParam queryParam){
        return queryAggregateService.sum(queryParam);
    }

//    @RequestMapping("findQuery2")
//    List<Order> findQuery2(QueryParam queryParam){
//       return queryAggregateService.findQuery2(queryParam);
//    }


}
